package comm.jr.controller;

import comm.jr.entry.Flights;
import comm.jr.service.FlightsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

@RestController /*替换@RestController=@Controller + @ResponseBody*/
@RequestMapping("/Fli/")
public class FlightsController {
    @Autowired
    private FlightsService flightsService;
    @RequestMapping("find")
    public ArrayList<Flights> getInformation(Flights flights){

        return flightsService.selectByTimeAndCity(flights);
    }
}
